import axios from 'axios'
import store from '@/store/index.js'
const requests = axios.create({
	baseURL: 'http://127.0.0.1:8888',
	timeout: 5000
})

requests.interceptors.request.use((config) => {
			config.headers['Authorization'] = store.state.token
			return config
		}, function(error) {
			return Promise.reject(error)
		})

requests.interceptors.response.use((res) => {
			return res.data
		}, (error) => {});

		export default requests
